package com.uranus.auth.auth.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uranus.auth.auth.beans.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.uranus.auth.auth.request.user.QueryUserRequest;
import com.uranus.auth.auth.response.user.UserResponse;
import javafx.scene.control.Pagination;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ybx
 * @since 2018-12-21
 */
@Repository
public interface UserMapper extends BaseMapper<User> {
    /**
     * 第一个参数必需是分页
     *  如果入参是有多个,需要加注解指定参数名才能在xml中取值
     * 分页返回的对象与传入的对象是同一个
     * @param page
     * @param req
     * @return
     */
    IPage<UserResponse> searchPagerUser(@Param("page") Page<UserResponse> page,@Param("req") QueryUserRequest req);
}
